<template>
	<view class="container">
		<navigator :url="'/pages/area/detail/detail?id='+item.id" v-for="(item,index) in list" class="area-list group">
			<view class="item"   >
							<view class="image">
								<image :src="item.logo" />
								<!-- <view class="icon" v-if="item.texing">
									{{item.texing}}
								</view>
								<view class="icon1" v-if="!item.texing">

								</view> -->
								<view class="guanzhu" v-if="item.guanzhu">
									<text class="text" >{{item.guanzhu}}人关注</text>
								</view>
							</view>
							<view class="shuge"></view>
							<view class="title">
								<view class="first-title">
									{{item.name}}
								</view>
								<view class="tag" >
									<view class="tag-item" v-for="(tag,index) in item.tags">{{tag.name}}</view>

								</view>
								<view class="title-park">{{item.type}} | {{item.area}}㎡</view>
								<view class="title-park">{{item.quyu}}·{{item.quyu1}}</view>
								<view class="bottom-price">
									<view class="price" v-if="item.price">
										<view class="price-title">每平均价</view>
										<view class="price-item">
											<view class="price-text"> {{item.price}}元</view>
										</view>
									</view>
								<view class="price" v-if="!item.price">
									<view class="price-title">每平均价</view>
									<view class="price-item">
										<view class="price-text"> 面议</view>
									</view>
								</view>
									<!-- <view class="price" v-if="item.price==0">
										<view class="price-title">每平售价</view>
										<view class="price-item">
											<view class="price-text"> 面议</view>
										</view>
									</view> -->
									<view class="shuxian"></view>
									<view class="zhekou">
										<view class="left">在售厂房</view>
										<view class="right">{{item.count}}<text>间</text></view>
									</view>
								</view>
								<view class="bottom-tip" v-if="item.tuijian">
									<view class="state">荐</view>
									<view  class="state-text">{{item.tuijian}}</view>
								</view>
							</view>
						</view>
		</navigator>

	</view>
</template>

<script>
	export default{
		data(){
			return{
				list:[]
			}
		},
		onLoad(option) {

			console.log(option)
			uni.setNavigationBarTitle({
				title:option.name
			})
			this.$api.RegionPark({id:option.id}).then(res=>{
				this.list=res.data
			})

		},
	}
</script>

<style scoped lang="scss">
	page{
		background-color: #f1f1f1;
	}
	.container{
		padding-top: 30rpx;
	}
	.shuge {
		width: 28rpx;
	}

	.shuxian {
		width: 2rpx;
		height: 58rpx;
		background: rgba(0, 0, 0, 1);
		opacity: 0.1;
		display: inline-block;
		float: left;
	}

	.biaozhi {
		display: inline-flex;
		justify-content: center;
		align-items: center;
		width: 100rpx;
		height: 35rpx;
		background: rgba(218, 51, 55, 1);
		border-radius: 4rpx;
		text-align: center;
		margin-right: 10rpx;

		.image1 {
			border-radius: 0rpx;
			width: 87rpx;
			height: 18rpx;
		}
	}

	.group {
		background: #FFFFFF;
		margin: 0 30rpx 30rpx;
		padding:15rpx 20rpx ;
		border-bottom: 2rpx solid #F5F5F5;
		border-radius: 10rpx;
	}
	.bottom-price{
		display: flex;
		align-items: center;
		height: 90rpx;
		margin:10rpx 0 15rpx ;
		border-bottom: 1px solid #e5e5e5;
	}
	.zhekou {

		margin-top: 20rpx;
		margin-bottom: 28rpx;
		display: flex;
		justify-content: space-between;
		flex-direction: column;
		align-items: flex-start;
		padding-left: 40rpx;
		padding-right: 32rpx;


		.left {
			font-size: 22rpx;
			font-family: SourceHanSansCN;
			font-weight: 500;
			color:#9a9ba0
		}

		.right {
			font-size: 30rpx;
			font-family: SourceHanSansCN;
			font-weight: bold;
			color: rgba(218, 51, 55, 1);

			text {
				font-size: 30rpx;
				font-family: SourceHanSansCN;
				font-weight: 500;
				color: rgba(218, 51, 55, 1);
			}
		}
	}

	.item {
		display: flex;

		.image {
			position: relative;
			width: 250rpx;
			height: 250rpx;
			border-radius: 10rpx;

			image {
				width: 250rpx;
				height: 250rpx;
				border-radius: 10rpx;
			}

			.icon {
				position: relative;
				width: fit-content;
				width: -webkit-fit-content;
				width: -moz-fit-content;
				top: -210rpx;
				left: 0rpx;
				padding-left: 12rpx;
				padding-right: 10rpx;
				height: 35rpx;
				z-index: 10;
				font-size: 20rpx;
				font-weight: bold;
				display: flex;
				align-items: center;
				justify-content: center;
				text-align: center;
				border-top-left-radius: 10rpx;
				border-bottom-left-radius: 5rpx;
				border-bottom-right-radius: 5rpx;
				border-top-right-radius: 5rpx;
				color: #FFFFFF;
				background: #DA3337;

			}

			.icon1 {
				position: relative;
				width: fit-content;
				width: -webkit-fit-content;
				width: -moz-fit-content;
				top: -255rpx;
				left: 0rpx;
				padding-left: 12rpx;
				padding-right: 10rpx;
				height: 35rpx;
				z-index: 10;
				font-size: 20rpx;
				font-weight: bold;
				display: flex;
				align-items: center;
				justify-content: center;
				text-align: center;
				border-top-left-radius: 10rpx;
				border-bottom-left-radius: 5rpx;
				border-bottom-right-radius: 5rpx;
				border-top-right-radius: 5rpx;
			}

			.guanzhu {
				position: absolute;
				width: 113rpx;
				height: 42rpx;
				z-index: 10;


				background: linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));

				bottom: 6rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				text-align: center;
				left: 0rpx;

				padding-left: 10rpx;
				padding-right: 10rpx;

				.text {
					font-size: 20rpx;
					font-family: SourceHanSansCN;
					font-weight: 400;
					color: rgba(255, 255, 255, 1);


				}

				width:fit-content;
				width:-webkit-fit-content;
				width:-moz-fit-content;
				border-bottom-left-radius:10rpx;
			}
		}


		.title {
			//width: 355rpx;
			display: flex;
			flex-direction: column;

			.first-title {
				font-size: 28rpx;
				font-weight: 700;
				color: #494949;
				text-overflow: -o-ellipsis-lastline;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				line-clamp: 2;
				-webkit-box-orient: vertical;

			}

			.title-park {
				font-size: 24rpx;
				color: #313131;
				margin-bottom: 6rpx;
			}

			.tag {
				display: flex;
				flex-wrap: wrap;
				margin: 20rpx 0 10rpx;

				.tag-item {
					display: flex;
					justify-content: center;
					align-items: center;
					color: #476987;
					margin-bottom: 11rpx;
					margin-right: 11rpx;
					height: 35rpx;
					font-size: 20rpx;
					padding: 6rpx 6rpx;
					background: rgba(236, 241, 244, 1);
					border-radius: 4rpx;
				}
			}

			.price {
				display: flex;
				align-items: flex-start;
				flex-direction: column;
				margin-top: 20rpx;
				margin-bottom: 28rpx;
				width: 159rpx;

				justify-content: space-between;

				.price-item {
					display: flex;
					flex-direction: row;
					align-items: center;

				}

				.price-title {
					font-size: 22rpx;
					font-family: SourceHanSansCN;
					font-weight: 400;
					color: #9a9ba0;
				}

				.price-text {
					color: rgba(218, 51, 55, 1);
					font-size: 30rpx;
					padding-right: 7rpx;
					font-weight: bold;
				}

				.price-danwei {
					color: #9A9BA0;
					font-size: 24rpx;

				}

				.price-dazhe {
					display: inline-flex;
					justify-content: center;
					align-items: center;
					font-size: 22rpx;
					font-family: SourceHanSansCN;
					font-weight: 400;
					color: rgba(218, 51, 55, 1);
					width: 120rpx;
					height: 35rpx;
					margin-left: 26rpx;
					background: url(https://pic.fhshidai.com/filef23kxK0Ld1c9zNixHVFjVmVXcUhv3QGLqj8YKarh.png);
					background-size: 120rpx 35rpx;
				}
			}

		}
		.bottom-tip{
			display: flex;
			align-items: center;
		}
		.state{
			display: flex;
			justify-content: center;
			align-items: center;
			width: 30rpx;
			height: 30rpx;
			background-color: #da3337;
			font-size: 20rpx;
			color: #fff;
			border-radius: 4rpx;
			margin-right: 10rpx;
		}
		.state-text{
			font-size: 20rpx;
			color: #313131;
		}
	}
</style>
